package Trip;

import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class Map_Trip implements WritableComparable<Map_Trip> {
    private String start_loc;
    private String end_loc;
    private String price;
    private String save;
    private String line;
    private String hotel;
    private String room;
    private String start_company;
    private String start_type;
    private String start_time;
    private String end_comany;
    private String end_type;
    private String end_time;


    public int compareTo(Map_Trip o) {
        return 0;
    }

    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeUTF(start_loc);
        dataOutput.writeUTF(end_loc);
        dataOutput.writeUTF(price);
        dataOutput.writeUTF(save);
        dataOutput.writeUTF(line);
        dataOutput.writeUTF(hotel);
        dataOutput.writeUTF(room);
        dataOutput.writeUTF(start_company);
        dataOutput.writeUTF(start_type);
        dataOutput.writeUTF(start_time);
        dataOutput.writeUTF(end_comany);
        dataOutput.writeUTF(end_type);
        dataOutput.writeUTF(end_time);
    }


    public void readFields(DataInput dataInput) throws IOException {
        start_loc = dataInput.readUTF();
        end_loc = dataInput.readUTF();
        price = dataInput.readUTF();
        save = dataInput.readUTF();
        line = dataInput.readUTF();
        hotel = dataInput.readUTF();
        room = dataInput.readUTF();
        start_company = dataInput.readUTF();
        start_type = dataInput.readUTF();
        start_time = dataInput.readUTF();
        end_comany = dataInput.readUTF();
        end_type = dataInput.readUTF();
        end_time = dataInput.readUTF();
    }

    public void set(String start_loc, String end_loc, String price, String save, String line, String hotel, String room, String start_company, String start_type, String start_time, String end_comany, String end_type, String end_time) {
        this.start_loc = start_loc;
        this.end_loc = end_loc;
        this.price = price;
        this.save = save;
        this.line = line;
        this.hotel = hotel;
        this.room = room;
        this.start_company = start_company;
        this.start_type = start_type;
        this.start_time = start_time;
        this.end_comany = end_comany;
        this.end_type = end_type;
        this.end_time = end_time;
    }

    @Override
    public String toString() {
        return start_loc + "\t" +
                end_loc + "\t" +
                price + "\t" +
                save + "\t" +
                line + "\t" +
                hotel + "\t" +
                room + "\t" +
                start_company + "\t" +
                start_type + "\t" +
                start_time + "\t" +
                end_comany + "\t" +
                end_type + "\t" +
                end_time;
    }

    public String getStart_loc() {
        return start_loc;
    }

    public void setStart_loc(String start_loc) {
        this.start_loc = start_loc;
    }

    public String getEnd_loc() {
        return end_loc;
    }

    public void setEnd_loc(String end_loc) {
        this.end_loc = end_loc;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getSave() {
        return save;
    }

    public void setSave(String save) {
        this.save = save;
    }

    public String getLine() {
        return line;
    }

    public void setLine(String line) {
        this.line = line;
    }

    public String getHotel() {
        return hotel;
    }

    public void setHotel(String hotel) {
        this.hotel = hotel;
    }

    public String getRoom() {
        return room;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public String getStart_company() {
        return start_company;
    }

    public void setStart_company(String start_company) {
        this.start_company = start_company;
    }

    public String getStart_type() {
        return start_type;
    }

    public void setStart_type(String start_type) {
        this.start_type = start_type;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setStart_time(String start_time) {
        this.start_time = start_time;
    }

    public String getEnd_comany() {
        return end_comany;
    }

    public void setEnd_comany(String end_comany) {
        this.end_comany = end_comany;
    }

    public String getEnd_type() {
        return end_type;
    }

    public void setEnd_type(String end_type) {
        this.end_type = end_type;
    }

    public String getEnd_time() {
        return end_time;
    }

    public void setEnd_time(String end_time) {
        this.end_time = end_time;
    }
}
